Two Photon (Bruker) tutorial with holographic stimulation¶

This tutorial demonstraces how to access the Two Photon dataset using pynwb.

This dataset contains the Two Photon imaging, holographic stimulation data and behavior measurements from the ViRMEN system.

Contents:

  • Reading an NWB file
  • Access subject and task metadata
  • Access Imaging
  • Access Behavior
  • Access Stimulus
  • View NWB files

A schematic representation where the source data is saved in NWB:

Alt text

Reading an NWB file ¶

This section demonstrates how to read an NWB file using pynwb.

Based on the NWB File Basics tutorial from PyNWB.

An NWBFile represents a single session of an experiment. Each NWBFile must have a session description, identifier, and session start time.

Reading is carried out using the NWBHDF5IO class. To read the NWB file use the read mode ("r") to retrieve an NWBFile object.

In [1]:
from pynwb import NWBHDF5IO

# The file path to a .nwb file
nwbfile_path = "/Volumes/t7-ssd/Pinto/nwbfiles/NCCR32_2023_02_20_Into_the_void_t_series_stim-000.nwb"
io = NWBHDF5IO(path=nwbfile_path, mode="r", load_namespaces=True)
nwbfile = io.read()

nwbfile
Out[1]:

root (NWBFile)

session_description: A rich text description of the experiment. Can also just be the abstract of the publication.
identifier: e1e814fb-d1e6-41da-aa5d-f8ae6fc15235
session_start_time: 2023-02-20 15:58:35-08:00
timestamps_reference_time: 2023-02-20 15:58:35-08:00
file_create_date
2023-12-07 11:38:02.770679+01:00
experimenter: ('Canton, Neto',)
acquisition (1)
TwoPhotonSeries
starting_time: 1.2678719758987427
rate: 29.873720497348387
resolution: -1.0
comments: no comments
description: Imaging data acquired from the Bruker Two-Photon Microscope.
conversion: 1.0
offset: 0.0
unit: n.a.
data
starting_time_unit: seconds
dimension
field_of_view
imaging_plane
optical_channel
Ch2 pynwb.ophys.OpticalChannel at 0x5486932336 Fields: description: An optical channel of the microscope. emission_lambda: nan
description: The plane or volume being imaged by the microscope.
device
description: Version 5.6.64.400
excitation_lambda: nan
imaging_rate: 29.873720497348454
indicator: unknown
location: unknown
conversion: 1.0
unit: meters
scan_line_rate: 15841.082262740192
stimulus (1)
HolographicStimulationSeries
resolution: -1.0
comments: no comments
description: The holographic stimulation for each ROI.
conversion: 1.0
offset: 0.0
unit: watts
data
timestamps
timestamps_unit: seconds
interval: 1
rois
description: The stimulated ROIs
table
description: The stimulated ROIs
id
colnames: ('ROICentroids', 'group_name')
columns: (, )
imaging_plane
optical_channel
OpticalChannel pynwb.ophys.OpticalChannel at 0x5486041024 Fields: description: An optical channel of the microscope. emission_lambda: nan
description: The plane imaged by the microscope during holographic stimulation.
device
excitation_lambda: nan
indicator: unknown
location: unknown
conversion: 1.0
unit: meters
site
device
description: The targeted location of the holographic stimulation.
excitation_lambda: 1050.0
location: soma
effector: ChRmine
stimulus_pattern
description: The spiral scanning pattern used for holographic stimulation.
duration: 0.25
number_of_stimulus_presentation: 220
inter_stimulus_interval: 0.035
diameter: 0.0264456981664316
height: 0.0264456981664316
number_of_revolutions: 5
device
spatial_light_modulator
description: NeuraLight 3D SLM Module for Photoactivation Pathway, multi-region, holographic stimulation and activation module using 512 x 512 spatial light modulator with Overdrive technology.
manufacturer: NeuraLight
light_source
description: The Coherent Monaco laser used for holographic stimulation with 251 fs pulse width and 2 MHz pulse rate.
stimulation_wavelength: 1035.0
filter_description: short pass 1040 nm filter
power: 700.0
intensity: 0.005
exposure_time: 2.51e-13
pulse_rate: 2000000.0
processing (2)
behavior
description: contains processed behavioral data
data_interfaces (8)
Position
spatial_series (2)
SpatialSeries
resolution: -1.0
comments: no comments
description: The x, y, z position of the animal by ViRMEN iteration.
conversion: 0.01
offset: 0.0
unit: meters
data
timestamps
timestamps_unit: seconds
interval: 1
reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task.
timestamp_link
SensorDots pynwb.base.TimeSeries at 0x5482077824 Fields: comments: no comments conversion: 1.0 data: description: The sensordots by ViRMEN iteration. interval: 1 offset: 0.0 resolution: -1.0 timestamps: SpatialSeries pynwb.behavior.SpatialSeries at 0x5486935072 Fields: comments: no comments conversion: 0.01 data: description: The x, y, z position of the animal by ViRMEN iteration. interval: 1 offset: 0.0 reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task. resolution: -1.0 timestamp_link: ( SensorDots , Velocity , VelocityGain , VelocityViewAngle ) timestamps: timestamps_unit: seconds unit: meters timestamps_unit: seconds unit: a.u.
Velocity pynwb.base.TimeSeries at 0x5486035696 Fields: comments: no comments conversion: 0.01 data: description: The velocity of the animal by ViRMEN iteration. interval: 1 offset: 0.0 resolution: -1.0 timestamps: SpatialSeries pynwb.behavior.SpatialSeries at 0x5486935072 Fields: comments: no comments conversion: 0.01 data: description: The x, y, z position of the animal by ViRMEN iteration. interval: 1 offset: 0.0 reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task. resolution: -1.0 timestamp_link: ( SensorDots , Velocity , VelocityGain , VelocityViewAngle ) timestamps: timestamps_unit: seconds unit: meters timestamps_unit: seconds unit: m/s
VelocityGain pynwb.base.TimeSeries at 0x5486036848 Fields: comments: no comments conversion: 1.0 data: description: The velocity gain by ViRMEN iteration. interval: 1 offset: 0.0 resolution: -1.0 timestamps: SpatialSeries pynwb.behavior.SpatialSeries at 0x5486935072 Fields: comments: no comments conversion: 0.01 data: description: The x, y, z position of the animal by ViRMEN iteration. interval: 1 offset: 0.0 reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task. resolution: -1.0 timestamp_link: ( SensorDots , Velocity , VelocityGain , VelocityViewAngle ) timestamps: timestamps_unit: seconds unit: meters timestamps_unit: seconds unit: a.u.
VelocityViewAngle pynwb.behavior.SpatialSeries at 0x5486037808 Fields: comments: no comments conversion: 1.0 data: description: The velocity view angle of the animal by ViRMEN iteration in the unit of degrees. interval: 1 offset: 0.0 reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task. resolution: -1.0 timestamps: SpatialSeries pynwb.behavior.SpatialSeries at 0x5486935072 Fields: comments: no comments conversion: 0.01 data: description: The x, y, z position of the animal by ViRMEN iteration. interval: 1 offset: 0.0 reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task. resolution: -1.0 timestamp_link: ( SensorDots , Velocity , VelocityGain , VelocityViewAngle ) timestamps: timestamps_unit: seconds unit: meters timestamps_unit: seconds unit: degrees
SpatialSeriesByImFrame
resolution: -1.0
comments: no comments
description: The average x, y position by imaging frame.
conversion: 1.0
offset: 0.0
unit: meters
data
timestamps
timestamps_unit: seconds
interval: 1
reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task.
timestamp_link
SensorDotsByImFrame pynwb.base.TimeSeries at 0x5486934160 Fields: comments: no comments conversion: 1.0 data: description: The sensordots averaged by imaging frame. interval: 1 offset: 0.0 resolution: -1.0 timestamps: SpatialSeriesByImFrame pynwb.behavior.SpatialSeries at 0x5486935216 Fields: comments: no comments conversion: 1.0 data: description: The average x, y position by imaging frame. interval: 1 offset: 0.0 reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task. resolution: -1.0 timestamp_link: ( SensorDotsByImFrame , VelocityByImFrame , PositionViewAngleByImFrame , VelocityViewAngleByImFrame ) timestamps: timestamps_unit: seconds unit: meters timestamps_unit: seconds unit: a.u.
VelocityByImFrame pynwb.base.TimeSeries at 0x5486036320 Fields: comments: no comments conversion: 0.01 data: description: The average x, y velocity by imaging frame. interval: 1 offset: 0.0 resolution: -1.0 timestamps: SpatialSeriesByImFrame pynwb.behavior.SpatialSeries at 0x5486935216 Fields: comments: no comments conversion: 1.0 data: description: The average x, y position by imaging frame. interval: 1 offset: 0.0 reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task. resolution: -1.0 timestamp_link: ( SensorDotsByImFrame , VelocityByImFrame , PositionViewAngleByImFrame , VelocityViewAngleByImFrame ) timestamps: timestamps_unit: seconds unit: meters timestamps_unit: seconds unit: m/s
PositionViewAngleByImFrame pynwb.behavior.SpatialSeries at 0x5486037664 Fields: comments: no comments conversion: 1.0 data: description: The average view angle of position by imaging frame. interval: 1 offset: 0.0 reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task. resolution: -1.0 timestamps: SpatialSeriesByImFrame pynwb.behavior.SpatialSeries at 0x5486935216 Fields: comments: no comments conversion: 1.0 data: description: The average x, y position by imaging frame. interval: 1 offset: 0.0 reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task. resolution: -1.0 timestamp_link: ( SensorDotsByImFrame , VelocityByImFrame , PositionViewAngleByImFrame , VelocityViewAngleByImFrame ) timestamps: timestamps_unit: seconds unit: meters timestamps_unit: seconds unit: degrees
VelocityViewAngleByImFrame pynwb.behavior.SpatialSeries at 0x5486039200 Fields: comments: no comments conversion: 1.0 data: description: The average view angle of velocity by imaging frame. interval: 1 offset: 0.0 reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task. resolution: -1.0 timestamps: SpatialSeriesByImFrame pynwb.behavior.SpatialSeries at 0x5486935216 Fields: comments: no comments conversion: 1.0 data: description: The average x, y position by imaging frame. interval: 1 offset: 0.0 reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task. resolution: -1.0 timestamp_link: ( SensorDotsByImFrame , VelocityByImFrame , PositionViewAngleByImFrame , VelocityViewAngleByImFrame ) timestamps: timestamps_unit: seconds unit: meters timestamps_unit: seconds unit: degrees
SensorDots
resolution: -1.0
comments: no comments
description: The sensordots by ViRMEN iteration.
conversion: 1.0
offset: 0.0
unit: a.u.
data
timestamps
resolution: -1.0
comments: no comments
description: The x, y, z position of the animal by ViRMEN iteration.
conversion: 0.01
offset: 0.0
unit: meters
data
timestamps
timestamps_unit: seconds
interval: 1
reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task.
timestamp_link
SensorDots pynwb.base.TimeSeries at 0x5482077824 Fields: comments: no comments conversion: 1.0 data: description: The sensordots by ViRMEN iteration. interval: 1 offset: 0.0 resolution: -1.0 timestamps: SpatialSeries pynwb.behavior.SpatialSeries at 0x5486935072 Fields: comments: no comments conversion: 0.01 data: description: The x, y, z position of the animal by ViRMEN iteration. interval: 1 offset: 0.0 reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task. resolution: -1.0 timestamp_link: ( SensorDots , Velocity , VelocityGain , VelocityViewAngle ) timestamps: timestamps_unit: seconds unit: meters timestamps_unit: seconds unit: a.u.
Velocity pynwb.base.TimeSeries at 0x5486035696 Fields: comments: no comments conversion: 0.01 data: description: The velocity of the animal by ViRMEN iteration. interval: 1 offset: 0.0 resolution: -1.0 timestamps: SpatialSeries pynwb.behavior.SpatialSeries at 0x5486935072 Fields: comments: no comments conversion: 0.01 data: description: The x, y, z position of the animal by ViRMEN iteration. interval: 1 offset: 0.0 reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task. resolution: -1.0 timestamp_link: ( SensorDots , Velocity , VelocityGain , VelocityViewAngle ) timestamps: timestamps_unit: seconds unit: meters timestamps_unit: seconds unit: m/s
VelocityGain pynwb.base.TimeSeries at 0x5486036848 Fields: comments: no comments conversion: 1.0 data: description: The velocity gain by ViRMEN iteration. interval: 1 offset: 0.0 resolution: -1.0 timestamps: SpatialSeries pynwb.behavior.SpatialSeries at 0x5486935072 Fields: comments: no comments conversion: 0.01 data: description: The x, y, z position of the animal by ViRMEN iteration. interval: 1 offset: 0.0 reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task. resolution: -1.0 timestamp_link: ( SensorDots , Velocity , VelocityGain , VelocityViewAngle ) timestamps: timestamps_unit: seconds unit: meters timestamps_unit: seconds unit: a.u.
VelocityViewAngle pynwb.behavior.SpatialSeries at 0x5486037808 Fields: comments: no comments conversion: 1.0 data: description: The velocity view angle of the animal by ViRMEN iteration in the unit of degrees. interval: 1 offset: 0.0 reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task. resolution: -1.0 timestamps: SpatialSeries pynwb.behavior.SpatialSeries at 0x5486935072 Fields: comments: no comments conversion: 0.01 data: description: The x, y, z position of the animal by ViRMEN iteration. interval: 1 offset: 0.0 reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task. resolution: -1.0 timestamp_link: ( SensorDots , Velocity , VelocityGain , VelocityViewAngle ) timestamps: timestamps_unit: seconds unit: meters timestamps_unit: seconds unit: degrees
timestamps_unit: seconds
interval: 1
SensorDotsByImFrame
resolution: -1.0
comments: no comments
description: The sensordots averaged by imaging frame.
conversion: 1.0
offset: 0.0
unit: a.u.
data
timestamps
resolution: -1.0
comments: no comments
description: The average x, y position by imaging frame.
conversion: 1.0
offset: 0.0
unit: meters
data
timestamps
timestamps_unit: seconds
interval: 1
reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task.
timestamp_link
SensorDotsByImFrame pynwb.base.TimeSeries at 0x5486934160 Fields: comments: no comments conversion: 1.0 data: description: The sensordots averaged by imaging frame. interval: 1 offset: 0.0 resolution: -1.0 timestamps: SpatialSeriesByImFrame pynwb.behavior.SpatialSeries at 0x5486935216 Fields: comments: no comments conversion: 1.0 data: description: The average x, y position by imaging frame. interval: 1 offset: 0.0 reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task. resolution: -1.0 timestamp_link: ( SensorDotsByImFrame , VelocityByImFrame , PositionViewAngleByImFrame , VelocityViewAngleByImFrame ) timestamps: timestamps_unit: seconds unit: meters timestamps_unit: seconds unit: a.u.
VelocityByImFrame pynwb.base.TimeSeries at 0x5486036320 Fields: comments: no comments conversion: 0.01 data: description: The average x, y velocity by imaging frame. interval: 1 offset: 0.0 resolution: -1.0 timestamps: SpatialSeriesByImFrame pynwb.behavior.SpatialSeries at 0x5486935216 Fields: comments: no comments conversion: 1.0 data: description: The average x, y position by imaging frame. interval: 1 offset: 0.0 reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task. resolution: -1.0 timestamp_link: ( SensorDotsByImFrame , VelocityByImFrame , PositionViewAngleByImFrame , VelocityViewAngleByImFrame ) timestamps: timestamps_unit: seconds unit: meters timestamps_unit: seconds unit: m/s
PositionViewAngleByImFrame pynwb.behavior.SpatialSeries at 0x5486037664 Fields: comments: no comments conversion: 1.0 data: description: The average view angle of position by imaging frame. interval: 1 offset: 0.0 reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task. resolution: -1.0 timestamps: SpatialSeriesByImFrame pynwb.behavior.SpatialSeries at 0x5486935216 Fields: comments: no comments conversion: 1.0 data: description: The average x, y position by imaging frame. interval: 1 offset: 0.0 reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task. resolution: -1.0 timestamp_link: ( SensorDotsByImFrame , VelocityByImFrame , PositionViewAngleByImFrame , VelocityViewAngleByImFrame ) timestamps: timestamps_unit: seconds unit: meters timestamps_unit: seconds unit: degrees
VelocityViewAngleByImFrame pynwb.behavior.SpatialSeries at 0x5486039200 Fields: comments: no comments conversion: 1.0 data: description: The average view angle of velocity by imaging frame. interval: 1 offset: 0.0 reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task. resolution: -1.0 timestamps: SpatialSeriesByImFrame pynwb.behavior.SpatialSeries at 0x5486935216 Fields: comments: no comments conversion: 1.0 data: description: The average x, y position by imaging frame. interval: 1 offset: 0.0 reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task. resolution: -1.0 timestamp_link: ( SensorDotsByImFrame , VelocityByImFrame , PositionViewAngleByImFrame , VelocityViewAngleByImFrame ) timestamps: timestamps_unit: seconds unit: meters timestamps_unit: seconds unit: degrees
timestamps_unit: seconds
interval: 1
Velocity
resolution: -1.0
comments: no comments
description: The velocity of the animal by ViRMEN iteration.
conversion: 0.01
offset: 0.0
unit: m/s
data
timestamps
resolution: -1.0
comments: no comments
description: The x, y, z position of the animal by ViRMEN iteration.
conversion: 0.01
offset: 0.0
unit: meters
data
timestamps
timestamps_unit: seconds
interval: 1
reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task.
timestamp_link
SensorDots pynwb.base.TimeSeries at 0x5482077824 Fields: comments: no comments conversion: 1.0 data: description: The sensordots by ViRMEN iteration. interval: 1 offset: 0.0 resolution: -1.0 timestamps: SpatialSeries pynwb.behavior.SpatialSeries at 0x5486935072 Fields: comments: no comments conversion: 0.01 data: description: The x, y, z position of the animal by ViRMEN iteration. interval: 1 offset: 0.0 reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task. resolution: -1.0 timestamp_link: ( SensorDots , Velocity , VelocityGain , VelocityViewAngle ) timestamps: timestamps_unit: seconds unit: meters timestamps_unit: seconds unit: a.u.
Velocity pynwb.base.TimeSeries at 0x5486035696 Fields: comments: no comments conversion: 0.01 data: description: The velocity of the animal by ViRMEN iteration. interval: 1 offset: 0.0 resolution: -1.0 timestamps: SpatialSeries pynwb.behavior.SpatialSeries at 0x5486935072 Fields: comments: no comments conversion: 0.01 data: description: The x, y, z position of the animal by ViRMEN iteration. interval: 1 offset: 0.0 reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task. resolution: -1.0 timestamp_link: ( SensorDots , Velocity , VelocityGain , VelocityViewAngle ) timestamps: timestamps_unit: seconds unit: meters timestamps_unit: seconds unit: m/s
VelocityGain pynwb.base.TimeSeries at 0x5486036848 Fields: comments: no comments conversion: 1.0 data: description: The velocity gain by ViRMEN iteration. interval: 1 offset: 0.0 resolution: -1.0 timestamps: SpatialSeries pynwb.behavior.SpatialSeries at 0x5486935072 Fields: comments: no comments conversion: 0.01 data: description: The x, y, z position of the animal by ViRMEN iteration. interval: 1 offset: 0.0 reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task. resolution: -1.0 timestamp_link: ( SensorDots , Velocity , VelocityGain , VelocityViewAngle ) timestamps: timestamps_unit: seconds unit: meters timestamps_unit: seconds unit: a.u.
VelocityViewAngle pynwb.behavior.SpatialSeries at 0x5486037808 Fields: comments: no comments conversion: 1.0 data: description: The velocity view angle of the animal by ViRMEN iteration in the unit of degrees. interval: 1 offset: 0.0 reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task. resolution: -1.0 timestamps: SpatialSeries pynwb.behavior.SpatialSeries at 0x5486935072 Fields: comments: no comments conversion: 0.01 data: description: The x, y, z position of the animal by ViRMEN iteration. interval: 1 offset: 0.0 reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task. resolution: -1.0 timestamp_link: ( SensorDots , Velocity , VelocityGain , VelocityViewAngle ) timestamps: timestamps_unit: seconds unit: meters timestamps_unit: seconds unit: degrees
timestamps_unit: seconds
interval: 1
VelocityByImFrame
resolution: -1.0
comments: no comments
description: The average x, y velocity by imaging frame.
conversion: 0.01
offset: 0.0
unit: m/s
data
timestamps
resolution: -1.0
comments: no comments
description: The average x, y position by imaging frame.
conversion: 1.0
offset: 0.0
unit: meters
data
timestamps
timestamps_unit: seconds
interval: 1
reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task.
timestamp_link
SensorDotsByImFrame pynwb.base.TimeSeries at 0x5486934160 Fields: comments: no comments conversion: 1.0 data: description: The sensordots averaged by imaging frame. interval: 1 offset: 0.0 resolution: -1.0 timestamps: SpatialSeriesByImFrame pynwb.behavior.SpatialSeries at 0x5486935216 Fields: comments: no comments conversion: 1.0 data: description: The average x, y position by imaging frame. interval: 1 offset: 0.0 reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task. resolution: -1.0 timestamp_link: ( SensorDotsByImFrame , VelocityByImFrame , PositionViewAngleByImFrame , VelocityViewAngleByImFrame ) timestamps: timestamps_unit: seconds unit: meters timestamps_unit: seconds unit: a.u.
VelocityByImFrame pynwb.base.TimeSeries at 0x5486036320 Fields: comments: no comments conversion: 0.01 data: description: The average x, y velocity by imaging frame. interval: 1 offset: 0.0 resolution: -1.0 timestamps: SpatialSeriesByImFrame pynwb.behavior.SpatialSeries at 0x5486935216 Fields: comments: no comments conversion: 1.0 data: description: The average x, y position by imaging frame. interval: 1 offset: 0.0 reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task. resolution: -1.0 timestamp_link: ( SensorDotsByImFrame , VelocityByImFrame , PositionViewAngleByImFrame , VelocityViewAngleByImFrame ) timestamps: timestamps_unit: seconds unit: meters timestamps_unit: seconds unit: m/s
PositionViewAngleByImFrame pynwb.behavior.SpatialSeries at 0x5486037664 Fields: comments: no comments conversion: 1.0 data: description: The average view angle of position by imaging frame. interval: 1 offset: 0.0 reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task. resolution: -1.0 timestamps: SpatialSeriesByImFrame pynwb.behavior.SpatialSeries at 0x5486935216 Fields: comments: no comments conversion: 1.0 data: description: The average x, y position by imaging frame. interval: 1 offset: 0.0 reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task. resolution: -1.0 timestamp_link: ( SensorDotsByImFrame , VelocityByImFrame , PositionViewAngleByImFrame , VelocityViewAngleByImFrame ) timestamps: timestamps_unit: seconds unit: meters timestamps_unit: seconds unit: degrees
VelocityViewAngleByImFrame pynwb.behavior.SpatialSeries at 0x5486039200 Fields: comments: no comments conversion: 1.0 data: description: The average view angle of velocity by imaging frame. interval: 1 offset: 0.0 reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task. resolution: -1.0 timestamps: SpatialSeriesByImFrame pynwb.behavior.SpatialSeries at 0x5486935216 Fields: comments: no comments conversion: 1.0 data: description: The average x, y position by imaging frame. interval: 1 offset: 0.0 reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task. resolution: -1.0 timestamp_link: ( SensorDotsByImFrame , VelocityByImFrame , PositionViewAngleByImFrame , VelocityViewAngleByImFrame ) timestamps: timestamps_unit: seconds unit: meters timestamps_unit: seconds unit: degrees
timestamps_unit: seconds
interval: 1
VelocityGain
resolution: -1.0
comments: no comments
description: The velocity gain by ViRMEN iteration.
conversion: 1.0
offset: 0.0
unit: a.u.
data
timestamps
resolution: -1.0
comments: no comments
description: The x, y, z position of the animal by ViRMEN iteration.
conversion: 0.01
offset: 0.0
unit: meters
data
timestamps
timestamps_unit: seconds
interval: 1
reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task.
timestamp_link
SensorDots pynwb.base.TimeSeries at 0x5482077824 Fields: comments: no comments conversion: 1.0 data: description: The sensordots by ViRMEN iteration. interval: 1 offset: 0.0 resolution: -1.0 timestamps: SpatialSeries pynwb.behavior.SpatialSeries at 0x5486935072 Fields: comments: no comments conversion: 0.01 data: description: The x, y, z position of the animal by ViRMEN iteration. interval: 1 offset: 0.0 reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task. resolution: -1.0 timestamp_link: ( SensorDots , Velocity , VelocityGain , VelocityViewAngle ) timestamps: timestamps_unit: seconds unit: meters timestamps_unit: seconds unit: a.u.
Velocity pynwb.base.TimeSeries at 0x5486035696 Fields: comments: no comments conversion: 0.01 data: description: The velocity of the animal by ViRMEN iteration. interval: 1 offset: 0.0 resolution: -1.0 timestamps: SpatialSeries pynwb.behavior.SpatialSeries at 0x5486935072 Fields: comments: no comments conversion: 0.01 data: description: The x, y, z position of the animal by ViRMEN iteration. interval: 1 offset: 0.0 reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task. resolution: -1.0 timestamp_link: ( SensorDots , Velocity , VelocityGain , VelocityViewAngle ) timestamps: timestamps_unit: seconds unit: meters timestamps_unit: seconds unit: m/s
VelocityGain pynwb.base.TimeSeries at 0x5486036848 Fields: comments: no comments conversion: 1.0 data: description: The velocity gain by ViRMEN iteration. interval: 1 offset: 0.0 resolution: -1.0 timestamps: SpatialSeries pynwb.behavior.SpatialSeries at 0x5486935072 Fields: comments: no comments conversion: 0.01 data: description: The x, y, z position of the animal by ViRMEN iteration. interval: 1 offset: 0.0 reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task. resolution: -1.0 timestamp_link: ( SensorDots , Velocity , VelocityGain , VelocityViewAngle ) timestamps: timestamps_unit: seconds unit: meters timestamps_unit: seconds unit: a.u.
VelocityViewAngle pynwb.behavior.SpatialSeries at 0x5486037808 Fields: comments: no comments conversion: 1.0 data: description: The velocity view angle of the animal by ViRMEN iteration in the unit of degrees. interval: 1 offset: 0.0 reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task. resolution: -1.0 timestamps: SpatialSeries pynwb.behavior.SpatialSeries at 0x5486935072 Fields: comments: no comments conversion: 0.01 data: description: The x, y, z position of the animal by ViRMEN iteration. interval: 1 offset: 0.0 reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task. resolution: -1.0 timestamp_link: ( SensorDots , Velocity , VelocityGain , VelocityViewAngle ) timestamps: timestamps_unit: seconds unit: meters timestamps_unit: seconds unit: degrees
timestamps_unit: seconds
interval: 1
ViewAngle
spatial_series (3)
PositionViewAngleByImFrame
resolution: -1.0
comments: no comments
description: The average view angle of position by imaging frame.
conversion: 1.0
offset: 0.0
unit: degrees
data
timestamps
resolution: -1.0
comments: no comments
description: The average x, y position by imaging frame.
conversion: 1.0
offset: 0.0
unit: meters
data
timestamps
timestamps_unit: seconds
interval: 1
reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task.
timestamp_link
SensorDotsByImFrame pynwb.base.TimeSeries at 0x5486934160 Fields: comments: no comments conversion: 1.0 data: description: The sensordots averaged by imaging frame. interval: 1 offset: 0.0 resolution: -1.0 timestamps: SpatialSeriesByImFrame pynwb.behavior.SpatialSeries at 0x5486935216 Fields: comments: no comments conversion: 1.0 data: description: The average x, y position by imaging frame. interval: 1 offset: 0.0 reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task. resolution: -1.0 timestamp_link: ( SensorDotsByImFrame , VelocityByImFrame , PositionViewAngleByImFrame , VelocityViewAngleByImFrame ) timestamps: timestamps_unit: seconds unit: meters timestamps_unit: seconds unit: a.u.
VelocityByImFrame pynwb.base.TimeSeries at 0x5486036320 Fields: comments: no comments conversion: 0.01 data: description: The average x, y velocity by imaging frame. interval: 1 offset: 0.0 resolution: -1.0 timestamps: SpatialSeriesByImFrame pynwb.behavior.SpatialSeries at 0x5486935216 Fields: comments: no comments conversion: 1.0 data: description: The average x, y position by imaging frame. interval: 1 offset: 0.0 reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task. resolution: -1.0 timestamp_link: ( SensorDotsByImFrame , VelocityByImFrame , PositionViewAngleByImFrame , VelocityViewAngleByImFrame ) timestamps: timestamps_unit: seconds unit: meters timestamps_unit: seconds unit: m/s
PositionViewAngleByImFrame pynwb.behavior.SpatialSeries at 0x5486037664 Fields: comments: no comments conversion: 1.0 data: description: The average view angle of position by imaging frame. interval: 1 offset: 0.0 reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task. resolution: -1.0 timestamps: SpatialSeriesByImFrame pynwb.behavior.SpatialSeries at 0x5486935216 Fields: comments: no comments conversion: 1.0 data: description: The average x, y position by imaging frame. interval: 1 offset: 0.0 reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task. resolution: -1.0 timestamp_link: ( SensorDotsByImFrame , VelocityByImFrame , PositionViewAngleByImFrame , VelocityViewAngleByImFrame ) timestamps: timestamps_unit: seconds unit: meters timestamps_unit: seconds unit: degrees
VelocityViewAngleByImFrame pynwb.behavior.SpatialSeries at 0x5486039200 Fields: comments: no comments conversion: 1.0 data: description: The average view angle of velocity by imaging frame. interval: 1 offset: 0.0 reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task. resolution: -1.0 timestamps: SpatialSeriesByImFrame pynwb.behavior.SpatialSeries at 0x5486935216 Fields: comments: no comments conversion: 1.0 data: description: The average x, y position by imaging frame. interval: 1 offset: 0.0 reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task. resolution: -1.0 timestamp_link: ( SensorDotsByImFrame , VelocityByImFrame , PositionViewAngleByImFrame , VelocityViewAngleByImFrame ) timestamps: timestamps_unit: seconds unit: meters timestamps_unit: seconds unit: degrees
timestamps_unit: seconds
interval: 1
reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task.
VelocityViewAngle
resolution: -1.0
comments: no comments
description: The velocity view angle of the animal by ViRMEN iteration in the unit of degrees.
conversion: 1.0
offset: 0.0
unit: degrees
data
timestamps
resolution: -1.0
comments: no comments
description: The x, y, z position of the animal by ViRMEN iteration.
conversion: 0.01
offset: 0.0
unit: meters
data
timestamps
timestamps_unit: seconds
interval: 1
reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task.
timestamp_link
SensorDots pynwb.base.TimeSeries at 0x5482077824 Fields: comments: no comments conversion: 1.0 data: description: The sensordots by ViRMEN iteration. interval: 1 offset: 0.0 resolution: -1.0 timestamps: SpatialSeries pynwb.behavior.SpatialSeries at 0x5486935072 Fields: comments: no comments conversion: 0.01 data: description: The x, y, z position of the animal by ViRMEN iteration. interval: 1 offset: 0.0 reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task. resolution: -1.0 timestamp_link: ( SensorDots , Velocity , VelocityGain , VelocityViewAngle ) timestamps: timestamps_unit: seconds unit: meters timestamps_unit: seconds unit: a.u.
Velocity pynwb.base.TimeSeries at 0x5486035696 Fields: comments: no comments conversion: 0.01 data: description: The velocity of the animal by ViRMEN iteration. interval: 1 offset: 0.0 resolution: -1.0 timestamps: SpatialSeries pynwb.behavior.SpatialSeries at 0x5486935072 Fields: comments: no comments conversion: 0.01 data: description: The x, y, z position of the animal by ViRMEN iteration. interval: 1 offset: 0.0 reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task. resolution: -1.0 timestamp_link: ( SensorDots , Velocity , VelocityGain , VelocityViewAngle ) timestamps: timestamps_unit: seconds unit: meters timestamps_unit: seconds unit: m/s
VelocityGain pynwb.base.TimeSeries at 0x5486036848 Fields: comments: no comments conversion: 1.0 data: description: The velocity gain by ViRMEN iteration. interval: 1 offset: 0.0 resolution: -1.0 timestamps: SpatialSeries pynwb.behavior.SpatialSeries at 0x5486935072 Fields: comments: no comments conversion: 0.01 data: description: The x, y, z position of the animal by ViRMEN iteration. interval: 1 offset: 0.0 reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task. resolution: -1.0 timestamp_link: ( SensorDots , Velocity , VelocityGain , VelocityViewAngle ) timestamps: timestamps_unit: seconds unit: meters timestamps_unit: seconds unit: a.u.
VelocityViewAngle pynwb.behavior.SpatialSeries at 0x5486037808 Fields: comments: no comments conversion: 1.0 data: description: The velocity view angle of the animal by ViRMEN iteration in the unit of degrees. interval: 1 offset: 0.0 reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task. resolution: -1.0 timestamps: SpatialSeries pynwb.behavior.SpatialSeries at 0x5486935072 Fields: comments: no comments conversion: 0.01 data: description: The x, y, z position of the animal by ViRMEN iteration. interval: 1 offset: 0.0 reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task. resolution: -1.0 timestamp_link: ( SensorDots , Velocity , VelocityGain , VelocityViewAngle ) timestamps: timestamps_unit: seconds unit: meters timestamps_unit: seconds unit: degrees
timestamps_unit: seconds
interval: 1
reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task.
VelocityViewAngleByImFrame
resolution: -1.0
comments: no comments
description: The average view angle of velocity by imaging frame.
conversion: 1.0
offset: 0.0
unit: degrees
data
timestamps
resolution: -1.0
comments: no comments
description: The average x, y position by imaging frame.
conversion: 1.0
offset: 0.0
unit: meters
data
timestamps
timestamps_unit: seconds
interval: 1
reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task.
timestamp_link
SensorDotsByImFrame pynwb.base.TimeSeries at 0x5486934160 Fields: comments: no comments conversion: 1.0 data: description: The sensordots averaged by imaging frame. interval: 1 offset: 0.0 resolution: -1.0 timestamps: SpatialSeriesByImFrame pynwb.behavior.SpatialSeries at 0x5486935216 Fields: comments: no comments conversion: 1.0 data: description: The average x, y position by imaging frame. interval: 1 offset: 0.0 reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task. resolution: -1.0 timestamp_link: ( SensorDotsByImFrame , VelocityByImFrame , PositionViewAngleByImFrame , VelocityViewAngleByImFrame ) timestamps: timestamps_unit: seconds unit: meters timestamps_unit: seconds unit: a.u.
VelocityByImFrame pynwb.base.TimeSeries at 0x5486036320 Fields: comments: no comments conversion: 0.01 data: description: The average x, y velocity by imaging frame. interval: 1 offset: 0.0 resolution: -1.0 timestamps: SpatialSeriesByImFrame pynwb.behavior.SpatialSeries at 0x5486935216 Fields: comments: no comments conversion: 1.0 data: description: The average x, y position by imaging frame. interval: 1 offset: 0.0 reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task. resolution: -1.0 timestamp_link: ( SensorDotsByImFrame , VelocityByImFrame , PositionViewAngleByImFrame , VelocityViewAngleByImFrame ) timestamps: timestamps_unit: seconds unit: meters timestamps_unit: seconds unit: m/s
PositionViewAngleByImFrame pynwb.behavior.SpatialSeries at 0x5486037664 Fields: comments: no comments conversion: 1.0 data: description: The average view angle of position by imaging frame. interval: 1 offset: 0.0 reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task. resolution: -1.0 timestamps: SpatialSeriesByImFrame pynwb.behavior.SpatialSeries at 0x5486935216 Fields: comments: no comments conversion: 1.0 data: description: The average x, y position by imaging frame. interval: 1 offset: 0.0 reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task. resolution: -1.0 timestamp_link: ( SensorDotsByImFrame , VelocityByImFrame , PositionViewAngleByImFrame , VelocityViewAngleByImFrame ) timestamps: timestamps_unit: seconds unit: meters timestamps_unit: seconds unit: degrees
VelocityViewAngleByImFrame pynwb.behavior.SpatialSeries at 0x5486039200 Fields: comments: no comments conversion: 1.0 data: description: The average view angle of velocity by imaging frame. interval: 1 offset: 0.0 reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task. resolution: -1.0 timestamps: SpatialSeriesByImFrame pynwb.behavior.SpatialSeries at 0x5486935216 Fields: comments: no comments conversion: 1.0 data: description: The average x, y position by imaging frame. interval: 1 offset: 0.0 reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task. resolution: -1.0 timestamp_link: ( SensorDotsByImFrame , VelocityByImFrame , PositionViewAngleByImFrame , VelocityViewAngleByImFrame ) timestamps: timestamps_unit: seconds unit: meters timestamps_unit: seconds unit: degrees
timestamps_unit: seconds
interval: 1
reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task.
TTLs
description: The times when the eye tracking and/or imaging was on determined from the ViRMEN system.
id
colnames: ('event_times', 'label', 'event_description')
columns: (, , , )
ophys
description: No description.
data_interfaces (3)
Fluorescence
roi_response_series (3)
Deconvolved
starting_time: 1.2678719758987427
rate: 9.999999999999991
resolution: -1.0
comments: no comments
description: description of deconvolved traces
conversion: 1.0
offset: 0.0
unit: n.a.
data
starting_time_unit: seconds
rois
description: The ROIs for ImagingPlane.
table
description: Segmented ROIs
id
colnames: ('image_mask', 'ROICentroids', 'Accepted', 'Rejected')
columns: (, , , )
imaging_plane
optical_channel
Ch2 pynwb.ophys.OpticalChannel at 0x5486932336 Fields: description: An optical channel of the microscope. emission_lambda: nan
description: The plane or volume being imaged by the microscope.
device
description: Version 5.6.64.400
excitation_lambda: nan
imaging_rate: 29.873720497348454
indicator: unknown
location: unknown
conversion: 1.0
unit: meters
Neuropil
starting_time: 1.2678719758987427
rate: 9.999999999999991
resolution: -1.0
comments: no comments
description: description of neuropil traces
conversion: 1.0
offset: 0.0
unit: n.a.
data
starting_time_unit: seconds
rois
description: The ROIs for ImagingPlane.
table
description: Segmented ROIs
id
colnames: ('image_mask', 'ROICentroids', 'Accepted', 'Rejected')
columns: (, , , )
imaging_plane
optical_channel
Ch2 pynwb.ophys.OpticalChannel at 0x5486932336 Fields: description: An optical channel of the microscope. emission_lambda: nan
description: The plane or volume being imaged by the microscope.
device
description: Version 5.6.64.400
excitation_lambda: nan
imaging_rate: 29.873720497348454
indicator: unknown
location: unknown
conversion: 1.0
unit: meters
RoiResponseSeries
starting_time: 1.2678719758987427
rate: 9.999999999999991
resolution: -1.0
comments: no comments
description: Array of raw fluorescence traces.
conversion: 1.0
offset: 0.0
unit: n.a.
data
starting_time_unit: seconds
rois
description: The ROIs for ImagingPlane.
table
description: Segmented ROIs
id
colnames: ('image_mask', 'ROICentroids', 'Accepted', 'Rejected')
columns: (, , , )
imaging_plane
optical_channel
Ch2 pynwb.ophys.OpticalChannel at 0x5486932336 Fields: description: An optical channel of the microscope. emission_lambda: nan
description: The plane or volume being imaged by the microscope.
device
description: Version 5.6.64.400
excitation_lambda: nan
imaging_rate: 29.873720497348454
indicator: unknown
location: unknown
conversion: 1.0
unit: meters
ImageSegmentation
plane_segmentations (2)
PlaneSegmentation
description: Segmented ROIs
id
colnames: ('image_mask', 'ROICentroids', 'Accepted', 'Rejected')
columns: (, , , )
imaging_plane
optical_channel
Ch2 pynwb.ophys.OpticalChannel at 0x5486932336 Fields: description: An optical channel of the microscope. emission_lambda: nan
description: The plane or volume being imaged by the microscope.
device
description: Version 5.6.64.400
excitation_lambda: nan
imaging_rate: 29.873720497348454
indicator: unknown
location: unknown
conversion: 1.0
unit: meters
PlaneSegmentationHolographicStimulation
description: The stimulated ROIs
id
colnames: ('ROICentroids', 'group_name')
columns: (, )
imaging_plane
optical_channel
OpticalChannel pynwb.ophys.OpticalChannel at 0x5486041024 Fields: description: An optical channel of the microscope. emission_lambda: nan
description: The plane imaged by the microscope during holographic stimulation.
device
excitation_lambda: nan
indicator: unknown
location: unknown
conversion: 1.0
unit: meters
SegmentationImages
description: The summary images of the segmentation.
images (2)
correlation
mean
epoch_tags: set()
devices (4)
BrukerFluorescenceMicroscope
description: Version 5.6.64.400
device
light_source
description: The Coherent Monaco laser used for holographic stimulation with 251 fs pulse width and 2 MHz pulse rate.
stimulation_wavelength: 1035.0
filter_description: short pass 1040 nm filter
power: 700.0
intensity: 0.005
exposure_time: 2.51e-13
pulse_rate: 2000000.0
spatial_light_modulator
description: NeuraLight 3D SLM Module for Photoactivation Pathway, multi-region, holographic stimulation and activation module using 512 x 512 spatial light modulator with Overdrive technology.
manufacturer: NeuraLight
imaging_planes (2)
ImagingPlane
optical_channel
Ch2 pynwb.ophys.OpticalChannel at 0x5486932336 Fields: description: An optical channel of the microscope. emission_lambda: nan
description: The plane or volume being imaged by the microscope.
device
description: Version 5.6.64.400
excitation_lambda: nan
imaging_rate: 29.873720497348454
indicator: unknown
location: unknown
conversion: 1.0
unit: meters
ImagingPlaneHolographicStimulation
optical_channel
OpticalChannel pynwb.ophys.OpticalChannel at 0x5486041024 Fields: description: An optical channel of the microscope. emission_lambda: nan
description: The plane imaged by the microscope during holographic stimulation.
device
excitation_lambda: nan
indicator: unknown
location: unknown
conversion: 1.0
unit: meters
ogen_sites (1)
site
device
description: The targeted location of the holographic stimulation.
excitation_lambda: 1050.0
location: soma
effector: ChRmine
subject
age__reference: birth
description: dual window injected with CHrmine
genotype: GP4.3
sex: F
species: Mus musculus
subject_id: NCCR32
date_of_birth: 2022-07-26 00:00:00-07:00
zygosity: Heterozygous
ear_tag_id: 12386
lab_meta_data (2)
LabMetaData
experiment_name: IntoTheVoid
experiment_code: IntoTheVoid
session_index: 1
total_reward: 0.0
rig: VR_2P
num_trials: 0
num_iterations: 77524
session_duration: 647.9919927
advance: 0
surface_quality: 56.78
mazes
description: The parameters for the maze in IntoTheVoid.
id
colnames: ('rewardFraction', 'antiFraction', 'world', 'maxTrialDuration', 'numTrials', 'numTrialsPerMin', 'criteriaNTrials', 'warmupNTrials', 'numSessions', 'performance', 'maxBias', 'warmupMaze', 'warmupPerform', 'warmupBias', 'warmupMotor', 'easyBlock', 'easyBlockNTrials', 'numBlockTrials', 'blockPerform')
columns: (, , , , , , , , , , , , , , , , , , )
stimulus_protocol
description: Holds information about the stimulus protocol.
id
colnames: ('numMazesInProtocol', 'trialDraw', 'stimDraw', 'trialEndPauseDuration', 'interTrialCorrectDuration', 'interTrialWrongDuration', 'targetNumTrials', 'panSessionTrials')
columns: (, , , , , , , )
stimulus_pattern
description: The spiral scanning pattern used for holographic stimulation.
duration: 0.25
number_of_stimulus_presentation: 220
inter_stimulus_interval: 0.035
diameter: 0.0264456981664316
height: 0.0264456981664316
number_of_revolutions: 5
session_id: Into-the-void-t-series-stim-000
lab: Pinto
institution: Northwestern University
protocol: IS00017322

Importantly, the session start time is the reference time for all timestamps in the file. For instance, an event with a timestamp of 0 in the file means the event occurred exactly at the session start time.

The session_start_time is extracted from the date and time variables from the ViRMEN file.

In [3]:
nwbfile.session_start_time
Out[3]:
datetime.datetime(2023, 2, 20, 15, 58, 35, tzinfo=tzoffset(None, -28800))

Access subject and task related metadata ¶

Access subject metadata¶

This section demonstrates how to access the Subject field in an NWB file.

The Subject field can be accessed as nwbfile.subject.

In [4]:
nwbfile.subject
Out[4]:

subject (SubjectExtension)

age__reference: birth
description: dual window injected with CHrmine
genotype: GP4.3
sex: F
species: Mus musculus
subject_id: NCCR32
date_of_birth: 2022-07-26 00:00:00-07:00
zygosity: Heterozygous
ear_tag_id: 12386

Access ViRMEN experimental metadata (mazes table, stimulus protocol parameters)¶

This section demonstrates how to access the task related metadata in an NWB file.

The ViRMEN experimental metadata is stored in a LabMetaData extension (ndx-pinto-metadata).

The LabMetaData](https://pynwb.readthedocs.io/en/stable/pynwb.file.html#pynwb.file.LabMetaData) object can be accessed as nwbfile.lab_meta_data["LabMetaData"].

The parameters for the mazes is added to the mazes table within nwbfile.lab_meta_data["LabMetaData"] which can be accessed as nwbfile.lab_meta_data["LabMetaData"].mazes.

Data arrays are read passively from the file. Accessing the data attribute of the mazes object does not read the data values, but presents an HDF5 object that can be indexed to read data. You can use the [:] operator to read the entire data array into memory as nwbfile.lab_meta_data["LabMetaData"].mazes[:].

In [5]:
nwbfile.lab_meta_data["LabMetaData"]
Out[5]:

LabMetaData (LabMetaDataExtension)

experiment_name: IntoTheVoid
experiment_code: IntoTheVoid
session_index: 1
total_reward: 0.0
rig: VR_2P
num_trials: 0
num_iterations: 77524
session_duration: 647.9919927
advance: 0
surface_quality: 56.78
mazes
description: The parameters for the maze in IntoTheVoid.
id
colnames: ('rewardFraction', 'antiFraction', 'world', 'maxTrialDuration', 'numTrials', 'numTrialsPerMin', 'criteriaNTrials', 'warmupNTrials', 'numSessions', 'performance', 'maxBias', 'warmupMaze', 'warmupPerform', 'warmupBias', 'warmupMotor', 'easyBlock', 'easyBlockNTrials', 'numBlockTrials', 'blockPerform')
columns: (, , , , , , , , , , , , , , , , , , )
stimulus_protocol
description: Holds information about the stimulus protocol.
id
colnames: ('numMazesInProtocol', 'trialDraw', 'stimDraw', 'trialEndPauseDuration', 'interTrialCorrectDuration', 'interTrialWrongDuration', 'targetNumTrials', 'panSessionTrials')
columns: (, , , , , , , )
In [6]:
nwbfile.lab_meta_data["LabMetaData"].mazes[:]
Out[6]:
rewardFraction antiFraction world maxTrialDuration numTrials numTrialsPerMin criteriaNTrials warmupNTrials numSessions performance maxBias warmupMaze warmupPerform warmupBias warmupMotor easyBlock easyBlockNTrials numBlockTrials blockPerform
id
0 1 0 1 1500 10 2 inf [] 0 0 inf [] [] [] [] NaN 10 20 0.7
In [7]:
nwbfile.lab_meta_data["LabMetaData"].stimulus_protocol[:]
Out[7]:
numMazesInProtocol trialDraw stimDraw trialEndPauseDuration interTrialCorrectDuration interTrialWrongDuration targetNumTrials panSessionTrials
id
0 1 Random Random 1 1 3 5 0

Access trials¶

Behavior trials are stored in nwbfile.trials. The start_time denotes the start time of each trial in seconds relative to the global session start time (using the "StartOfTrial" column from ViRMEN .mat file). The stop_time denotes the end time of each trial in seconds relative to the global session start time (using the "EndOfTrial" column from the ViRMEN .mat file).

nwbfile.trials can be converted to a pandas DataFrame for convenient analysis using nwbfile.trials.to_dataframe.

In [66]:
trials = nwbfile.trials.to_dataframe()

trials[:10]
Out[66]:
start_time stop_time InterTrial SetupTrial InitializeTrial WithinTrial WithinContext WithinCue WithinDelay WithinArms ... nSalient nDistract posSalient startIdx mazeID mainMazeID distanceTraveled excessTravel rewardFactor reward
id
0 0.972257 9.469965 11.092663 0.000000 0.000000 7.842325 1.316735 2.925307 6.958919 7.850775 ... 1 0 [14.691288945029548] 1.0 1.0 1.0 91.593116 -0.040910 2.0 1.0
1 13.482450 23.810661 24.893987 11.115410 13.451317 21.935497 13.801357 14.560017 20.968785 21.944084 ... 2 0 [44.09698487410711, 38.86791360641561] 1366.0 1.0 1.0 94.579079 -0.009643 2.0 0.0
2 35.008142 41.995798 43.054207 24.912208 34.978534 39.545645 35.295272 36.178588 38.787250 39.553976 ... 1 0 [42.11787931412284] 3932.0 1.0 1.0 90.914928 -0.048011 2.0 0.0
3 53.151482 68.236366 69.848842 43.074311 53.130345 57.364091 53.513897 54.022254 56.688921 57.372551 ... 1 0 [31.783853729187047] 6075.0 1.0 1.0 92.609304 -0.030269 2.0 1.0
4 71.959344 81.675022 82.749953 69.873477 71.932397 75.490970 72.199315 72.724034 74.924241 75.499314 ... 2 0 [14.271608632711335, 33.884239554294254] 8242.0 1.0 1.0 96.921628 0.014886 2.0 0.0
5 92.866958 101.618587 102.676910 82.788998 92.851003 100.118571 95.401442 96.151644 99.143451 100.126880 ... 1 0 [26.718764940159723] 10731.0 1.0 1.0 87.346694 -0.085375 2.0 0.0
6 112.769690 119.411429 121.029033 102.709764 112.761271 116.961812 112.928090 113.603236 116.378474 116.970110 ... 2 0 [19.012859718297292, 11.962659024131625] 12997.0 1.0 1.0 91.323754 -0.043730 2.0 1.0
7 123.112274 131.304998 132.354923 121.058213 123.104128 127.154467 123.445751 124.079284 126.654448 127.162771 ... 1 0 [32.039676313071055] 14152.0 1.0 1.0 99.661530 0.043576 2.0 0.0
8 142.439660 148.148746 149.773579 132.386134 142.431252 147.264814 142.722701 143.322924 146.606358 147.273311 ... 1 0 [37.11488286759698] 16459.0 1.0 1.0 86.169050 -0.097706 2.0 1.0
9 151.868783 161.983193 163.033029 149.807003 151.857001 156.399116 152.348734 153.390386 155.899177 156.407534 ... 2 0 [40.686167878929986, 24.67109827312018] 17502.0 1.0 1.0 108.372694 0.134793 2.0 0.0

10 rows × 44 columns

In [67]:
trials[trials["trial_type"] == "right"][:3]
Out[67]:
start_time stop_time InterTrial SetupTrial InitializeTrial WithinTrial WithinContext WithinCue WithinDelay WithinArms ... nSalient nDistract posSalient startIdx mazeID mainMazeID distanceTraveled excessTravel rewardFactor reward
id
1 13.482450 23.810661 24.893987 11.115410 13.451317 21.935497 13.801357 14.560017 20.968785 21.944084 ... 2 0 [44.09698487410711, 38.86791360641561] 1366.0 1.0 1.0 94.579079 -0.009643 2.0 0.0
2 35.008142 41.995798 43.054207 24.912208 34.978534 39.545645 35.295272 36.178588 38.787250 39.553976 ... 1 0 [42.11787931412284] 3932.0 1.0 1.0 90.914928 -0.048011 2.0 0.0
3 53.151482 68.236366 69.848842 43.074311 53.130345 57.364091 53.513897 54.022254 56.688921 57.372551 ... 1 0 [31.783853729187047] 6075.0 1.0 1.0 92.609304 -0.030269 2.0 1.0

3 rows × 44 columns

Access TwoPhoton Imaging ¶

This section demonstraces how to access the raw Two Photon imaging data.

NWB organizes data into different groups depending on the type of data. Groups can be thought of as folders within the file. Here are some of the groups within an NWBFile and the types of data they are intended to store:

  • acquisition: raw, acquired data that should never change
  • processing: processed data, typically the results of preprocessing algorithms and could change

Raw TwoPhoton Imaging¶

The raw TwoPhoton imaging data is stored in pynwb.ophys.TwoPhotonSeries objects (for each channel and plane separately) which is added to nwbfile.acquisition. The data can be accessed as nwbfile.acquisition['TwoPhotonSeries'].

The data in TwoPhotonSeries is stored as a three dimensional array: the first dimension is time (frame), the second and third dimensions represent x and y (width by height).

In [6]:
photon_series = nwbfile.acquisition['TwoPhotonSeries']
In [7]:
# Visualize the imaging data.

from matplotlib import pyplot as plt

plt.imshow(photon_series.data[50].T, aspect="auto", cmap="RdYlBu_r")
plt.title("TwoPhotonSeries")
plt.show()
No description has been provided for this image

TODO: times

In [8]:
photon_series.rate
Out[8]:
29.873720497348387
In [9]:
photon_series.starting_time
Out[9]:
1.2678719758987427

Accessing the segmentation data¶

The segmentation output for the Two Photon Imaging data is stored in nwbfile.processing["ophys"].

In NWB, the PlaneSegmentation class stores the detected regions of interest in the TwoPhotonSeries data. The ImageSegmentation can contain multiple PlaneSegmentation tables, so that we can store results of different segmentation algorithms or different segmentation classes.

We can access the plane segmentation for the TwoPhotonSeries data as nwbfile.processing["ophys"]["ImageSegmentation"]["PlaneSegmentation"].

In [9]:
plane_segmentation = nwbfile.processing["ophys"]["ImageSegmentation"]["PlaneSegmentation"][:]
plane_segmentation[:10]
Out[9]:
image_mask ROICentroids Accepted Rejected
id
0 [[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,... [128, 63] 1 0
1 [[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,... [248, 311] 1 0
2 [[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,... [404, 155] 1 0
3 [[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,... [391, 220] 1 0
4 [[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,... [32, 222] 1 0
5 [[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,... [174, 316] 1 0
6 [[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,... [121, 411] 1 0
7 [[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,... [293, 297] 1 0
8 [[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,... [262, 117] 1 0
9 [[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,... [218, 284] 1 0
In [10]:
plt.imshow(photon_series.data[50].T, aspect="auto", cmap="RdYlBu_r")
plt.title("TwoPhotonSeries")
plt.show()

plt.imshow(plane_segmentation.image_mask[1].T, aspect="auto", cmap="RdYlBu_r")
plt.title("Image mask (single ROI)")
plt.show()
No description has been provided for this image
No description has been provided for this image

The summary images of the segmentation are stored in Images container in NWB.

In [74]:
images = nwbfile.processing["ophys"]["SegmentationImages"]
images
Out[74]:

SegmentationImages (Images)

description: The summary images of the segmentation.
images (2)
correlation
mean
In [75]:
plt.imshow(photon_series.data[50].T, aspect="auto", cmap="RdYlBu_r")
plt.title("TwoPhotonSeries")
plt.show()

plt.imshow(images.images["correlation"].data[:].T, aspect="auto", cmap="RdYlBu_r")
plt.title("Image Correlation")
plt.show()

plt.imshow(images.images["mean"].data[:].T, aspect="auto", cmap="RdYlBu_r")
plt.title("Image mean")
plt.show()
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image

The fluroscence traces are stored in a Fluorescence container, the raw traces can be accessed as nwbfile.processing["ophys"]["Fluorescence"]["RoiResponseSeries"].

In [76]:
nwbfile.processing["ophys"]["Fluorescence"].roi_response_series
Out[76]:
{'Deconvolved': Deconvolved pynwb.ophys.RoiResponseSeries at 0x15896491920
 Fields:
   comments: no comments
   conversion: 1.0
   data: <HDF5 dataset "data": shape (100, 481), type "<f4">
   description: description of deconvolved traces
   offset: 0.0
   rate: 10.0
   resolution: -1.0
   rois: rois <class 'hdmf.common.table.DynamicTableRegion'>
   starting_time: 0.0
   starting_time_unit: seconds
   unit: n.a.,
 'Neuropil': Neuropil pynwb.ophys.RoiResponseSeries at 0x15896462736
 Fields:
   comments: no comments
   conversion: 1.0
   data: <HDF5 dataset "data": shape (100, 481), type "<f4">
   description: description of neuropil traces
   offset: 0.0
   rate: 10.0
   resolution: -1.0
   rois: rois <class 'hdmf.common.table.DynamicTableRegion'>
   starting_time: 0.0
   starting_time_unit: seconds
   unit: n.a.,
 'RoiResponseSeries': RoiResponseSeries pynwb.ophys.RoiResponseSeries at 0x15896491280
 Fields:
   comments: no comments
   conversion: 1.0
   data: <HDF5 dataset "data": shape (100, 481), type "<f4">
   description: Array of raw fluorescence traces.
   offset: 0.0
   rate: 10.0
   resolution: -1.0
   rois: rois <class 'hdmf.common.table.DynamicTableRegion'>
   starting_time: 0.0
   starting_time_unit: seconds
   unit: n.a.}

Visualize raw traces¶

In [106]:
import pandas as pd
import numpy as np
import pandas as pd
import warnings
warnings.simplefilter(action='ignore', category=pd.errors.PerformanceWarning)

data = nwbfile.processing["ophys"]["Fluorescence"]["RoiResponseSeries"].data[:, :10]
df = pd.DataFrame(data)
df["time"] = np.arange(0, data.shape[0])
df.set_index("time", inplace=True)
df.columns.name = 'ROIs'

import plotly.express as px

fig = px.line(df, facet_row="ROIs", facet_row_spacing=0.01)

# hide and lock down axes
fig.update_xaxes(visible=True, fixedrange=False)
fig.update_yaxes(visible=False, fixedrange=False)

# remove facet/subplot labels
fig.update_layout(annotations=[], overwrite=True)

# strip down the rest of the plot
fig.update_layout(
    showlegend=True,
    plot_bgcolor="white",
    margin=dict(t=10, l=10, b=10, r=10)
)

fig.show(config=dict(displayModeBar=True))

Access Behavior ¶

This section demonstrates how to access behavioral data from the pynwb.behavior module.

The behavior data is stored in the "behavior" processing module, which can be accessed as nwbfile.processing["behavior"].

In [78]:
nwbfile.processing["behavior"]
Out[78]:

behavior (ProcessingModule)

description: contains processed behavioral data
data_interfaces (5)
Position
spatial_series (1)
SpatialSeries
resolution: -1.0
comments: no comments
description: The x, y, z position of the animal by ViRMEN iteration.
conversion: 0.01
offset: 0.0
unit: meters
data
timestamps
timestamps_unit: seconds
interval: 1
reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task.
SensorDots
resolution: -1.0
comments: no comments
description: The sensordots by ViRMEN iteration.
conversion: 1.0
offset: 0.0
unit: a.u.
data
timestamps
timestamps_unit: seconds
interval: 1
Velocity
resolution: -1.0
comments: no comments
description: The velocity of the animal by ViRMEN iteration.
conversion: 0.01
offset: 0.0
unit: m/s
data
timestamps
timestamps_unit: seconds
interval: 1
VelocityGain
resolution: -1.0
comments: no comments
description: The velocity gain by ViRMEN iteration.
conversion: 1.0
offset: 0.0
unit: a.u.
data
timestamps
timestamps_unit: seconds
interval: 1
ViewAngle
spatial_series (2)
PositionViewAngle
resolution: -1.0
comments: no comments
description: The view angle of the animal by ViRMEN iteration.
conversion: 1.0
offset: 0.0
unit: meters
data
timestamps
timestamps_unit: seconds
interval: 1
reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task.
VelocityViewAngle
resolution: -1.0
comments: no comments
description: The velocity view angle of the animal by ViRMEN iteration.
conversion: 1.0
offset: 0.0
unit: meters
data
timestamps
timestamps_unit: seconds
interval: 1
reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task.

Access Position¶

SpatialSeries is a subclass of TimeSeries that represents data in space, such as the spatial direction, e.g., of gaze or travel, or position of an animal over time.

The x, y (z) position of the animal is stored stored in SpatialSeries object inside the Position container.

The Position container can be accessed as nwbfile.processing["behavior"]["Position"].

In [79]:
nwbfile.processing["behavior"]["Position"]
Out[79]:

Position

spatial_series (1)
SpatialSeries
resolution: -1.0
comments: no comments
description: The x, y, z position of the animal by ViRMEN iteration.
conversion: 0.01
offset: 0.0
unit: meters
data
timestamps
timestamps_unit: seconds
interval: 1
reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task.

The x, y, z position of the animal by ViRMEN iteration can be accessed as nwbfile.processing["behavior"]["Position"]["SpatialSeries"].

In [9]:
position_by_virmen = nwbfile.processing["behavior"]["Position"]["SpatialSeries"]
position_by_virmen
Out[9]:

SpatialSeries

resolution: -1.0
comments: no comments
description: The x, y, z position of the animal by ViRMEN iteration.
conversion: 0.01
offset: 0.0
unit: meters
data
timestamps
timestamps_unit: seconds
interval: 1
reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task.
timestamp_link
SensorDots pynwb.base.TimeSeries at 0x5482077824 Fields: comments: no comments conversion: 1.0 data: description: The sensordots by ViRMEN iteration. interval: 1 offset: 0.0 resolution: -1.0 timestamps: SpatialSeries pynwb.behavior.SpatialSeries at 0x5486935072 Fields: comments: no comments conversion: 0.01 data: description: The x, y, z position of the animal by ViRMEN iteration. interval: 1 offset: 0.0 reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task. resolution: -1.0 timestamp_link: ( SensorDots , Velocity , VelocityGain , VelocityViewAngle ) timestamps: timestamps_unit: seconds unit: meters timestamps_unit: seconds unit: a.u.
Velocity pynwb.base.TimeSeries at 0x5486035696 Fields: comments: no comments conversion: 0.01 data: description: The velocity of the animal by ViRMEN iteration. interval: 1 offset: 0.0 resolution: -1.0 timestamps: SpatialSeries pynwb.behavior.SpatialSeries at 0x5486935072 Fields: comments: no comments conversion: 0.01 data: description: The x, y, z position of the animal by ViRMEN iteration. interval: 1 offset: 0.0 reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task. resolution: -1.0 timestamp_link: ( SensorDots , Velocity , VelocityGain , VelocityViewAngle ) timestamps: timestamps_unit: seconds unit: meters timestamps_unit: seconds unit: m/s
VelocityGain pynwb.base.TimeSeries at 0x5486036848 Fields: comments: no comments conversion: 1.0 data: description: The velocity gain by ViRMEN iteration. interval: 1 offset: 0.0 resolution: -1.0 timestamps: SpatialSeries pynwb.behavior.SpatialSeries at 0x5486935072 Fields: comments: no comments conversion: 0.01 data: description: The x, y, z position of the animal by ViRMEN iteration. interval: 1 offset: 0.0 reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task. resolution: -1.0 timestamp_link: ( SensorDots , Velocity , VelocityGain , VelocityViewAngle ) timestamps: timestamps_unit: seconds unit: meters timestamps_unit: seconds unit: a.u.
VelocityViewAngle pynwb.behavior.SpatialSeries at 0x5486037808 Fields: comments: no comments conversion: 1.0 data: description: The velocity view angle of the animal by ViRMEN iteration in the unit of degrees. interval: 1 offset: 0.0 reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task. resolution: -1.0 timestamps: SpatialSeries pynwb.behavior.SpatialSeries at 0x5486935072 Fields: comments: no comments conversion: 0.01 data: description: The x, y, z position of the animal by ViRMEN iteration. interval: 1 offset: 0.0 reference_frame: (0,0) is the start of the 'sample' region (or 'cue' region) which varies by maze and task. resolution: -1.0 timestamp_link: ( SensorDots , Velocity , VelocityGain , VelocityViewAngle ) timestamps: timestamps_unit: seconds unit: meters timestamps_unit: seconds unit: degrees

Access Stimulus ¶

This section demonstrates how to access the holographic stimulation data and metadata.

The metadata about the stimulus pattern can be accessed as nwbfile.lab_meta_data["stimulus_pattern"].

In [11]:
nwbfile.lab_meta_data["stimulus_pattern"]
Out[11]:

stimulus_pattern (SpiralScanning)

description: The spiral scanning pattern used for holographic stimulation.
duration: 0.25
number_of_stimulus_presentation: 220
inter_stimulus_interval: 0.035
diameter: 0.0264456981664316
height: 0.0264456981664316
number_of_revolutions: 5

The metadata about the laser and the spatial light modulator can be accessed as nwbfile.devices["light_source"] and nwbfile.devices["spatial_light_modulator"].

In [12]:
nwbfile.devices["light_source"]
Out[12]:

light_source (LightSource)

description: The Coherent Monaco laser used for holographic stimulation with 251 fs pulse width and 2 MHz pulse rate.
stimulation_wavelength: 1035.0
filter_description: short pass 1040 nm filter
power: 700.0
intensity: 0.005
exposure_time: 2.51e-13
pulse_rate: 2000000.0
In [109]:
nwbfile.devices["spatial_light_modulator"]
Out[109]:

spatial_light_modulator (SpatialLightModulator)

description: todo
model: todo
resolution: 0.01

The holographic stimulation data is added to nwbfile.stimulus['HolographicStimulationSeries'].

In [13]:
nwbfile.stimulus['HolographicStimulationSeries']
Out[13]:

HolographicStimulationSeries (PatternedOptogeneticSeries)

resolution: -1.0
comments: no comments
description: The holographic stimulation for each ROI.
conversion: 1.0
offset: 0.0
unit: watts
data
timestamps
timestamps_unit: seconds
interval: 1
rois
description: The stimulated ROIs
table
description: The stimulated ROIs
id
colnames: ('ROICentroids',)
columns: (,)
imaging_plane
optical_channel
OpticalChannel pynwb.ophys.OpticalChannel at 0x5537329104 Fields: description: An optical channel of the microscope. emission_lambda: nan
description: The plane imaged by the microscope during holographic stimulation.
device
excitation_lambda: nan
indicator: unknown
location: unknown
conversion: 1.0
unit: meters
site
device
description: The targeted location of the holographic stimulation.
excitation_lambda: 1050.0
location: soma
effector: ChRmine
stimulus_pattern
description: The spiral scanning pattern used for holographic stimulation.
duration: 0.25
number_of_stimulus_presentation: 220
inter_stimulus_interval: 0.035
diameter: 0.0264456981664316
height: 0.0264456981664316
number_of_revolutions: 5
device
spatial_light_modulator
description: NeuraLight 3D SLM Module for Photoactivation Pathway, multi-region, holographic stimulation and activation module using 512 x 512 spatial light modulator with Overdrive technology.
manufacturer: NeuraLight
light_source
description: The Coherent Monaco laser used for holographic stimulation with 251 fs pulse width and 2 MHz pulse rate.
stimulation_wavelength: 1035.0
filter_description: short pass 1040 nm filter
power: 700.0
intensity: 0.005
exposure_time: 2.51e-13
pulse_rate: 2000000.0
In [10]:
nwbfile.stimulus['HolographicStimulationSeries'].rois[:]
Out[10]:
ROICentroids group_name
id
0 [0.0683571651946306, 0.0765404684108739] Group 1
1 [0.102249060191222, 0.166825722550099] Group 1
2 [0.272195521877857, 0.255426084269439] Group 1
3 [0.456430474938853, 0.235232439755493] Group 1
4 [0.19082531222494, 0.509463082620459] Group 1
5 [0.766124354559356, 0.436106953520161] Group 1
6 [0.0850359175296207, 0.574455355585571] Group 1
7 [0.374361657682214, 0.785003873657909] Group 1
8 [0.147069202594338, 0.865054738234017] Group 1
9 [0.855240795499256, 0.832339567691665] Group 1
10 [0.244959174484967, 0.129455213619052] Group 2
11 [0.263193759963008, 0.0824014245326254] Group 2
12 [0.558654481883044, 0.289053975670996] Group 2
13 [0.065312711682222, 0.444247719409258] Group 2
14 [0.829056084887867, 0.323306440818213] Group 2
15 [0.290936046110726, 0.614761678774383] Group 2
16 [0.219902083662898, 0.629668163399408] Group 2
17 [0.779489488393223, 0.777581052742591] Group 2
18 [0.22288540868105, 0.775867314033998] Group 2
19 [0.55324150127567, 0.726225678092943] Group 2
20 [0.640033747469953, 0.0614025480962288] Group 3
21 [0.171501640727355, 0.104856471848038] Group 3
22 [0.197842514511006, 0.171083853539225] Group 3
23 [0.557873666021733, 0.201207121040656] Group 3
24 [0.212477234654433, 0.425388481242167] Group 3
25 [0.333489496505596, 0.626025708108721] Group 3
26 [0.690932801161692, 0.664648713986135] Group 3
27 [0.723288999217156, 0.71065600700909] Group 3
28 [0.245011904906769, 0.807846286764258] Group 3
29 [0.38223065908971, 0.880054515143771] Group 3

Visualise holographic stimulation series¶

In [11]:
import pandas as pd
import numpy as np
import pandas as pd
import warnings
warnings.simplefilter(action='ignore', category=pd.errors.PerformanceWarning)

data = nwbfile.stimulus['HolographicStimulationSeries'].data[:, :10]
df = pd.DataFrame(data)
df["time"] = nwbfile.stimulus['HolographicStimulationSeries'].timestamps
df.set_index("time", inplace=True)
df.columns.name = 'Stimulated ROIs'

import plotly.express as px

fig = px.line(df, facet_row="Stimulated ROIs", facet_row_spacing=0.01)

# hide and lock down axes
fig.update_xaxes(visible=True, fixedrange=False)
fig.update_yaxes(visible=False, fixedrange=False)

# remove facet/subplot labels
fig.update_layout(annotations=[], overwrite=True)

# strip down the rest of the plot
fig.update_layout(
    showlegend=True,
    plot_bgcolor="white",
    margin=dict(t=10, l=10, b=10, r=10)
)

fig.show(config=dict(displayModeBar=True))
In [14]:
from nwbwidgets import nwb2widget

nwb2widget(nwbfile)
Out[14]:
VBox(children=(HBox(children=(Label(value='session_description:', layout=Layout(max_height='40px', max_width='…

We also use Neurosift, a platform for the visualization of neuroscience data in the web browser.